package compoundDB.database.container;

import compoundDB.database.enumeration.DataType;

/**
 * A simple container to store the information of a column field in the
 * database.
 * 
 * @author Kohl Bromwich
 */
public class ColumnField
{
	/**
	 * The name of the column in the database.
	 */
	private String m_name;
	
	/**
	 * The datatype stored in the column.
	 */
	private DataType m_type;
	
	/**
	 * The column number in the database.
	 */
	private int m_columnNum;
	
	/**
	 * Creates a new column field information container.
	 * 
	 * @param name
	 *            the name of the column in the database.
	 * @param type
	 *            the data type of the column in the database.
	 * @param columnNum
	 *            the number of teh column in the database.
	 */
	public ColumnField(String name, DataType type, int columnNum)
	{
		m_name = name;
		m_type = type;
		m_columnNum = columnNum;
	}
	
	/**
	 * Get the name of the column within the database.
	 * 
	 * @return the name of the column within the database.
	 */
	public String getName()
	{
		return m_name;
	}
	
	/**
	 * Get the data type of the column within the database.
	 * 
	 * @return the data type of the column within the database.
	 */
	public DataType getDataType()
	{
		return m_type;
	}
	
	/**
	 * Get the column number of the column within the database.
	 * 
	 * @return the column number of the column within the database.
	 */
	public int getColumnNumber()
	{
		return m_columnNum;
	}
}
